﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using F_MODEL;
using F_BLL;

namespace MvcApplication1.Controllers
{
    public class BookDetailsController : ApiController
    {
        BookDetails_bll bbll = new BookDetails_bll();
        /// <summary>
        /// 订单详情
        /// </summary>
        /// <param name="waybid"></param>
        /// <returns></returns>
        [HttpGet]
        public UserAddrModel getmails(string waybid)
        {
            UserAddrModel m = new UserAddrModel();
            UserAddrModel list = bbll.getmails(waybid).FirstOrDefault();
            return list;
        }
        /// <summary>
        /// 包裹详情
        /// </summary>
        /// <param name="waybid"></param>
        /// <returns></returns>
        [HttpGet]
        public ParcelInfo getparcel(string mailid)
        {
            ParcelInfo m = new ParcelInfo();
            ParcelInfo list = bbll.getparcel(mailid).FirstOrDefault();
            return list;
        }
        /// <summary>
        /// 修改状态
        /// </summary>
        /// <param name="waybillId"></param>
        /// <returns></returns>
        [HttpGet]
        public int uptstate(string waybillId)
        {
            return bbll.uptstate(waybillId);
        }
    }
}
